package com.android.equipment

import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import com.android.equipment.bean.RealDataBean

class AlamViewModel: ViewModel() {
    //实时报警数据有报警
     val realAlamData = MutableLiveData<String>()

    //监听实时数据的变化
    val realData = MutableLiveData<MutableMap<String, MutableList<RealDataBean>>>()

    //异常报警数据
    val errorAlamData = MutableLiveData<String>()

    companion object{
        private var sInstance: AlamViewModel? =null

        @Synchronized
        fun getInstance(): AlamViewModel {
            if (sInstance == null){
                sInstance = AlamViewModel()
            }
            return sInstance!!
        }
    }

}